<template>
  <el-row>
    <el-col :span="8" class="el-col">
      <label>{{prefixDesc}}：</label>
    </el-col>
    <el-col :span="16">
      <el-input v-model="itemValue" :placeholder="'请输入' + prefixDesc" size="small"/>
    </el-col>
  </el-row>
</template>
<script>
export default {
  name: 'MyInput',
  props: {
    prefixDesc: {
      type: String,
      required: true
    },
    value: {
      type: String,
      required: false,
      default: ''
    }
  },
  computed: {
    itemValue: {
      get: function() {
        return this.value
      },
      set: function(value) {
        this.$emit('input', value)
      }
    }
  }
}
</script>
<style lang="scss" scoped>
.el-row {
  line-height: 32px;
  .el-col {
    text-align: right;
  }
  .el-input {
    width: 100%;
  }
}
</style>


